<?php
declare (strict_types = 1);
namespace app\user\model\user;

use app\common\model\BaseModel;

/**
 * 定义用户余额模型
 */
class Expenditure extends BaseModel
{
    /**
     * 表名
     * @var string
     */
    protected $name = 'user_expenditure';

    /**
     * 设置自动写入时间
     * @var boolean
     */
    protected $autoWriteTimestamp = true;
    protected $createTime = false;

    /**
     * 定义字段类型
     * @var array
     */
    protected $type = [
        'id'            => 'integer',
        'user_id'       => 'integer',
        'num'           => 'float',
        'update_time'   => 'integer',
    ];

    /**
     * 定义表主键
     * @var string
     */
    protected $pk = 'id';


}
